﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Xml.Serialization;

namespace Sovigaz.DataProvider
{
    public partial class SovigazDbContext
    {
        public DbSet<Command> Commands { get; set; }
    }

    [Table("Commands")]
    public class Command : AuditableEntity
    {
        [Key]
        public int CommandID { get; set; }

        public int DeliveryPlanID { get; set; }

        [NotMapped]
        public string DeliveryPlanCode { get; set; }

        public int UserID { get; set; }

        [NotMapped]
        public string UserName { get; set; }

        [NotMapped]
        public string TaixeBocxep { get; set; }

        public DateTime Date { get; set; }

        public string LicensePlate { get; set; }

        public string CommandCode { get; set; }

        public string Status { get; set; }

        public string Description { get; set; }

        [NotMapped]
        public List<CommandLine> CommandLines { get; set; }
    }

    public class CommandComplex
    {
        public int CommandID { get; set; }

        public int DeliveryPlanID { get; set; }

        public int UserID { get; set; }

        public string UserName { get; set; }

        public DateTime Date { get; set; }

        public int PlanQty { get; set; }

        public int ShippedQty { get; set; }

        public int ReceivedQty { get; set; }

        public string LicensePlate { get; set; }

        public string CommandCode { get; set; }

        public string Status { get; set; }

        public string Description { get; set; }

        public string CreatedName { get; set; }

        public DateTime CreatedDate { get; set; }
    }

    public enum CommandStatus { N, C }
}